package org.eiahe.hr.interview.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.ehe.common.mybatis.core.page.PageQuery;
import org.ehe.common.mybatis.core.page.TableDataInfo;
import org.eiahe.hr.interview.domain.InterviewRecord;
import org.eiahe.hr.interview.domain.vo.InterviewRecordVO;
import org.eiahe.hr.interview.domain.dto.InterviewRecordDTO;
import org.eiahe.hr.interview.domain.dto.InterviewRecordResultDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 面试记录
 * @author :zhangnn
 * @className :InterviewRecordService
 * @description: TODO
 * @date 2025-08-14 09:38:56
 */
public interface InterviewRecordService extends IService<InterviewRecord> {
    /**
     * 分页
     * @param queryDTO
     * @param pageQuery
     * @return
     */
    TableDataInfo<InterviewRecordVO> selectRecordPage(InterviewRecordDTO queryDTO, PageQuery pageQuery);

    /**
     * 根据ID获取面试详情
     * @param id
     * @return
     */
    InterviewRecordVO selectById(Long id);

    /**
     * 新增面试记录
     * @param dto
     * @return
     */
    boolean insertRecord(InterviewRecordDTO dto);

    /**
     * 修改面试记录
     * @param id
     * @param dto
     * @return
     */
    boolean updateRecord(Long id, InterviewRecordDTO dto);

    /**
     * 删除面试记录
     * @param list
     * @return
     */
    boolean deleteByIds(List<String> list);

    /**
     * 简历解析
     * @param file
     * @param categoryId
     * @return
     */
    InterviewRecordDTO parseResumeAndCreateRecord(MultipartFile file, Long categoryId);

    /**
     * 更新面试状态
     * @param id
     * @param status
     * @return
     */
    boolean updateInterviewStatus(Long id, Integer status);

    /**
     * 更新面试结果
     * @return
     */
    boolean updateInterviewResult(InterviewRecordResultDTO dto);

    /**
     * 更新录用状态
     * @param id
     * @param isHired
     * @return
     */
    boolean updateHireStatus(Long id, Integer isHired);

    /**
     * 面试详情
     * @param id
     * @return
     */
    InterviewRecordVO detail(Long id,String flag);
}
